package com.coder520.user.controller;

import com.coder520.user.entity.User;
import com.coder520.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by 来自北海的风 on 2017/6/24.
 */

    @Controller
    @RequestMapping("user")
    public class UserController {
        @Autowired
        private UserService userService;
    @RequestMapping("/index")
    public String user(){
        User user=new User();
        user.setUsername("laowang");
        user.setPassword("123456");
        user.setRealName("laowangdaren");
        userService.createUser(user);

        return "indexx";
    }
}
